From b5cfe603afd009fd0f450e5f7e85e2a32ecf418d Mon Sep 17 00:00:00 2001 From: Jeroen van der Heijden Date: Fri, 21 Sep 2018 18:18:40 +0200 Subject: [PATCH] On Heartbeat interval --- src/siri/heartbeat.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/siri/heartbeat.c b/src/siri/heartbeat.c index 6d557889..6ee7dea0 100644 --- a/src/siri/heartbeat.c +++ b/src/siri/heartbeat.c @@ -74,6 +74,12 @@ static void HEARTBEAT_cb(uv_timer_t * handle __attribute__((unused))) { siridb = (siridb_t *) siridb_node->data; + /* flush the buffer, maybe on each insert or another interval? */ + if (siridb_buffer_fsync(siridb)) + { + log_critical("fsync() has failed on the buffer file"); + } + server_node = siridb->servers->first; while (server_node != NULL) { @@ -94,10 +100,5 @@ static void HEARTBEAT_cb(uv_timer_t * handle __attribute__((unused))) siridb_node = siridb_node->next; } - /* flush the buffer, maybe on each insert or another interval? */ - if (siridb_buffer_fsync(siridb)) - { - log_critical("fsync() has failed on the buffer file"); - } } -- 2.30.2